.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 间隔，每个下拉菜单之间留出空间 */
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px; /* 按钮圆角 */
}

.dropdown-btn:hover {
    background-color: #3e8e41;
}

.dropdown-content {
    display: none;
    position: absolute; /* 绝对定位以覆盖其他内容 */
    background-color: #f9f9f9;
    min-width: 160px;
    max-height: 200px; /* 最大高度限制为4行 */
    overflow-y: auto; /* 启用垂直滚动 */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px; /* 下拉菜单圆角 */
}

.dropdown-content .menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f0f0f0; /* 文本底色 */
    border-radius: 5px; /* 文本和删除按钮的圆角 */
    margin-bottom: 5px; /* 每个菜单项之间的间隔 */
}

.dropdown-content a {
    color: black;
    text-decoration: none;
    display: block;
    margin-right: 10px;
    flex-grow: 1; /* 文本占据剩余空间 */
}

.dropdown-content .delete-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px; /* 删除按钮圆角 */
}

.dropdown-content .delete-btn:hover {
    background: #d32f2f;
}

.dropdown-content .add-item {
    font-weight: bold;
    padding: 8px 12px;
    background-color: #f0f0f0; /* 添加新项的底色 */
    border-radius: 5px; /* 添加项按钮圆角 */
    position: sticky; /* 固定在菜单底部 */
    bottom: 0;
}

.dropdown-content a:hover, .dropdown-content .add-item:hover {
    background-color: #e1e1e1; /* 悬停时的背景色 */
}

.dropdown:hover .dropdown-content {
    display: block;
}
